package personal.study.util;

import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.Calendar;


public class DateTime {
	
	public static final String YEAR_TO_DAY = "yyyy-MM-dd";
	
	public DateTime(){
		
	}
	
	public static Date convertToDate(){
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat(YEAR_TO_DAY);
		String dateString = simpleDateFormat.format(Calendar.getInstance().getTime());
		Date date = Date.valueOf(dateString);
		return date;
	}
	
	public static void main(String args[]){
		Date date = convertToDate();
		System.out.println(date);
	}
}
